const setters = {
  //商家端token
  set_token(token) {
    wx.setStorageSync('token', token)
  },
  //用户端token
  set_user_token(token) {
    wx.setStorageSync('user_token', token)
  },
  set_login() {
    wx.setStorageSync('is_login', true)
  },
  set_invite_code(code) {
    wx.setStorageSync('code', code)
  },
  set_userinfo(userinfo) {
    wx.setStorageSync('userinfo', userinfo)
  },
  //设置微信code值
  setJsCode($param) {
    wx.setStorageSync('js_code', $param)
  },
  //openid
  setOpenId($param) {
    wx.setStorageSync('openid', $param)
  }
}
const getters = {
  get_token() {
    return wx.getStorageSync('token')
  },
  get_login_status() {
    return wx.getStorageSync('is_login')

  },
  get_userinfo() {
    return wx.getStorageSync('userinfo')

  },
  get_invite_code() {
    return wx.getStorageSync('code')
  },
  getJsCode() {
    return wx.getStorageSync('js_code')
  },
  getOpenId() {
    return wx.getStorageSync('openid')
  },
  //用户端token
  get_user_token() {
    wx.getStorageSync('user_token')
  }
}
export default {
  setters, getters
}
